home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / Documentation / Common Component / Common Component
Encoding:
Text File  |  1994-04-21  |  16.2 KB  |  69 lines  |  [ONLN/HLX2]

  1. Common component
  2.  
  3. Introduction
  4. The Common component is a collection of generic type definitions and functions, that is, definitions and functions that are needed by many of the other OPF components.
  5. Common component Overview
  6. The Common component contains no classes and no methods. The Common component is not intended to be extended.
  7. Directory
  8. FWCommon
  9. Common component classes
  10. There are no classes in the Common component.
  11. Additional Common component interfaces
  12. The following constants are defined in FWStdDef.h:
  13. •    FALSE denotes a constant value 0.
  14. •    NULL denotes a constant value 0.
  15. •    TRUE denotes a constant value 1.
  16. The following named types are defined in FWStdDef.h:
  17. •    FW_Boolean denotes a type used for OPF Boolean values.
  18. •    FW_PlatformHandle denotes a type used to represent OPF handles. This type corresponds to the platform-specific handle type.
  19. •    FW_ResourceId denotes a type used to represent the resource identifier for OPF resources. This type corresponds to the platform-specific resource identifier.
  20. •    FW_ResourceType denotes a type used to represent the type identifier for OPF resources. This type corresponds to the platform-specific type identifier.
  21. The following function templates are defined in FWMath.h:
  22. •    FW_Absolute denotes a function template for taking the absolute value of some numeric type, tType, where tType is a template parameter.
  23. •    FW_Maximum denotes a function template for computing the maximum of two values a and b. The two values can be of any type, tType, where tType is a template parameter; however, they must be of the same type and the type must support the '<' operator.
  24. •    FW_Minimuim denotes a function template for computing the minimum of two values a and b. The two values can be of any type, tType, where tType is a template parameter; however, they must be of the same type and the type must support the '<' operator.
  25. The following functions are defined in FWPriStr.h:
  26. •    FW_PrimitiveStringCopy denotes a function that copies from a string source to a string destination, and returns the string source.
  27. •    FW_PrimitiveStringEqual denotes a function that compares one string to another string. Returns TRUE if the two strings are equal and FALSE if they are not.
  28. •    FW_PrimitiveStringFindCharacter denotes a function that returns a pointer to the first occurrence of a specified character in a string source and NULL if the character is not present.
  29. •    FW_PrimitiveStringLength denotes a function that returns the length of a string. The string is assumed to be non-NULL.
  30. The following primitive memory operations are defined in FWPriMem.h:
  31. •    FW_PrimitiveAllocateBlock denotes a function that allocates a block of memory and returns a pointer to that block of memory, if the allocate block request could be satisfied, and NULL if it could not. This is a low-level method; use the FW_CMemoryManager::Allocate–Block method instead.
  32. •    FW_PrimitiveCopyMemory denotes a function that copies a block of memory pointed to by a source to the block of memory pointed to by a destination. This is a low-level method; use the FW_CMemoryManager::–CopyMemory method instead.
  33. •    FW_PrimitiveFreeBlock denotes a function that frees a block of memory that was allocated by FW_PrimitiveAllocateBlock. This is a low-level method; use the FW_CMemoryManager::FreeBlock method instead.
  34. •    FW_PrimitiveGetBlockSize denotes a function that gets the size of a block of memory and returns the block size in bytes. This is a low-level method; use the FW_CMemoryManager::GetBlockSize method instead.
  35. •    FW_PrimitiveResizeBlock denotes a function that resizes a block of memory and returns a pointer to that block of memory, if the resize block request could be satisfied, and NULL if it could not. The block can be moved to satisfy the request. This is a low-level method; use the FW_CMemoryManager::ResizeBlock method instead.
  36. Component dependencies
  37. The Common component is entirely self-contained and is not dependent on any other OPF components.
  38. <dˇ ˇˇˇˇd
  39. d
  40. 4¥læ
  41. ,Times
  42. .˝`(ªèOPF Reference Manual)v1
  43. ˇˇˇˇˇˇˇˇt¥¯Δ
  44. Ω
  45. ΔΩ¯¥Ω
  46. p¥¯Δ
  47. Ω
  48. ΔΩ¯¥Ω
  49.  ΩlΩÔ
  50. $∂İdONLNd{düÏ(ñdCommon∂İdONLNdü@√Ï(∫@    Component¿°dONLNdˇˇ+ö$1
  51. °dONLNd·2(· Introduction, Palatino
  52. °dONLNd·$Ù*The ª¿°dONLNd#Ù$Q)Common componentó@°dONLNd3R$)^- is a collection of generic type definitions °dONLNd`$·0(-·Eand functions, that is, definitions and functions that are needed by °dONLNd•0·<Ä* !many of the other OPF components.
  53. °dONLNd«G·Vj*Common Componentl °dONLNd◊GkV¨)ä     Overview
  54. ˇˇ˝≤°dONLNd·[·gÙ(d·The πr°dONLNdÂ[ÙgQ)Common componentí§°dONLNdı[Rg    )^) contains no classes and no methods. The °dONLNdg·s>(p·Common component[İdONLNd.g?s…)^  is not intended to be extended.
  55. °dONLNdO~·ä(á·    Directory,
  56. Courier
  57. .°dONLNdYå·ò*FWCommon
  58. .°dONLNdb£·ØK*Common componentx¿°dONLNdr£LØp)k classes
  59. °dONLNd{±·ΩV(∫·There are no classes in the kİdONLNdó±WΩ¥)vCommon componentG°dONLNdß±µΩ∑)^.
  60. °dONLNd©»·‘(—· Additional +¿°dONLNd¥»‘Ö):Common component$İdONLNdƒ»Ü‘∫)k  interfaces
  61. .°dONLNd–÷·‚è(fl·'The following constants are defined in °dONLNd˜÷è‚À)Æ
  62. FWStdDef.h°dONLNd÷À‚Œ)<:.°dONLNdÏÛ¯˘(ıÛ•.LÕ°dONLNdÏ˛¯) FALSELÕ°dONLNd
  63. ϯï) denotes a constant value 0..°dONLNd'¯Û˘(Û•.LÕ°dONLNd)¯˛) NULLLÕ°dONLNd-¯è) denotes a constant value 0..°dONLNdJÛ˘(
  64. Û•.LÕ°dONLNdL˛) TRUELÕ°dONLNdPè) denotes a constant value 1.°dONLNdm·&ü(#·)The following named types are defined in °dONLNdñü&€)æ
  65. FWStdDef.h°dONLNd†€&fi)<:.°dONLNd¢0Û<˘(9Û•.LÕ°dONLNd§0˛<:)
  66. FW_BooleanLÕ°dONLNdÆ0:<·)<% denotes a type used for OPF Boolean .LÕ°dONLNd”<˛H(E˛values.°dONLNd€RÛ^˘([Û•.LÕ°dONLNd›R˛^d) FW_PlatformHandleLÕ°dONLNdÓRd^ˆ)f" denotes a type used to represent .LÕ°dONLNd^˛jÂ(g˛3OPF handles. This type corresponds to the platform-LÕ°dONLNdCj˛vX* specific handle type.ˇÜdˇ ˇˇˇˇd
  67. d
  68. 4oly¯,Times
  69. .+lx1)Common Component ~l~¯4≥ZΩ¯
  70. (πZ2)OPF Reference Manual
  71. ˇˇˇˇˇˇˇˇtzZÉc~cÉ^~Zz^~cpzZÉc~cÉ^~Zz^~c
  72. 4êœö¯, Palatino°dONLNdç·ôÁ(ñ·•,
  73. Courier.LÕ°dONLNdçÏô:)
  74. FW_ResourceIdLÕ°dONLNdç:ôfi)N& denotes a type used to represent the .LÕ°dONLNd5ôÏ•ø(¢Ï1resource identifier for OPF resources. This type LÕ°dONLNdf•ϱ·* 9corresponds to the platform-specific resource identifier.°dONLNd†ª·«Á(ƒ·•ˇ˛ì2.LÕ°dONLNd¢ªÏ«F) FW_ResourceTypeˇˇÜfLÕ°dONLNd±ªF«Ê)Z& denotes a type used to represent the .LÕ°dONLNd◊«Ï”Ê(–Ï9type identifier for OPF resources. This type corresponds LÕ°dONLNd”Ïflñ* )to the platform-specific type identifier..°dONLNd:Èœı®(Úœ0The following function templates are defined in °dONLNdjÈ®ıÿ)ŸFWMath.h°dONLNdrÈÿı€)0:.°dONLNdtˇ· Á(·•.LÕ°dONLNdvˇÏ .) FW_AbsoluteLÕ°dONLNdŎ. ›)B( denotes a function template for taking LÕ°dONLNd© ϧ(Ï)the absolute value of some numeric type, LÕ°dONLNd“ §¬)∏tTypeLÕ°dONLNd◊ ¬Ê), where LÕ°dONLNdflÏ#
  75. ( ÏtTypeLÕ°dONLNd‰
  76. #}) is a template parameter..°dONLNd˛-·9Á(6·•ˇˇ®:.LÕ°dONLNd-Ï9()
  77. FW_Maximumˇˇ‚æLÕ°dONLNd
  78. -(9Ê)<+ denotes a function template for computing ˇˇŸòLÕ°dONLNd59ÏEi(BÏthe maximum of two values ˇˇå»å≈°dONLNdO9iEo)}aˇˇŸòå≈°dONLNdP9oEÉ) and ˇˇå»?ı°dONLNdU9ÑEä)bˇˇŸò?ı°dONLNdV9äEÊ). The two values can LÕ°dONLNdkEÏQ0(NÏbe of any type, LÕ°dONLNd{E0QN)DtTypeLÕ°dONLNdÄENQr), where LÕ°dONLNdàErQê)$tTypeLÕ°dONLNdçEêQ–) is a template .LÕ°dONLNdúQÏ]`(ZÏparameter; however, they îM°dONLNdµQ`]t)tmust"-°dONLNdπQu]‚) be of the same type and LÕ°dONLNd“]Ïi(fÏ    the type «m°dONLNd€]i&)&mustUM°dONLNdfl]'iî) support the '<' operator.°dONLNd˙s·Á(|·•.LÕ°dONLNd¸sÏ.) FW_MinimuimLÕ°dONLNds.Ω)B! denotes a function template for LÕ°dONLNd(Ïãò(àÏ$computing the minimum of two values LÕ°dONLNdLòãû)¨aLÕ°dONLNdMûã≥) and LÕ°dONLNdR≥ãπ)bLÕ°dONLNdSπãÂ)
  79. . The two LÕ°dONLNd]ãÏóa(îÏvalues can be of any type, LÕ°dONLNdxãaó)utTypeLÕ°dONLNd}ãó£), where LÕ°dONLNdÖã£ó¡)$tTypeLÕ°dONLNdäã¡ó’) is a .LÕ°dONLNdêóÏ£â(†Ï"template parameter; however, they ÍÕ°dONLNd≤óâ£ù)ùmustx≠°dONLNd∂óû£‚) be of the same LÕ°dONLNdΔ£ÏØ<(¨Ïtype and the type QÕ°dONLNdÿ£<ØP)Pmustfl≠°dONLNd‹£PØΩ) support the '<' operator..°dONLNd˜πœ≈|(¬œ'The following functions are defined in °dONLNdπ|≈∏)≠
  80. FWPriStr.h°dONLNd(π∏≈ª)<:.°dONLNd*œ·€Á(ÿ·•.LÕ°dONLNd,œÏ€p) FW_PrimitiveStringCopyLÕ°dONLNdBœp€€)Ñ denotes a function that .LÕ°dONLNd[€ÏÁfi(‰Ï9copies from a string source to a string destination, and LÕ°dONLNdîÁÏÛZ* returns the string source.°dONLNdØ˝·    Á(·•.LÕ°dONLNd±˝Ï    v) FW_PrimitiveStringEqualLÕ°dONLNd»˝v    ·)ä denotes a function that .LÕ°dONLNd·    Ï·(Ï7compares one string to another string. Returns TRUE if LÕ°dONLNdÏ!–* 4the two strings are equal and FALSE if they are not.°dONLNdM+·7Á(4·•.LÕ°dONLNdO+Ï7¶) FW_PrimitiveStringFindCharacterLÕ°dONLNdn+¶7‘)∫  denotes a ˇˇπ.LÕ°dONLNdy7ÏCÊ(@Ï=function that returns a pointer to the first occurrence of a LÕ°dONLNd∂CÏO⁄* 7specified character in a string source and NULL if the LÕ°dONLNdÌOÏ[U* character is not present.°dONLNde·qÁ(n·•ˇˇÖ.LÕ°dONLNd    eÏq|) FW_PrimitiveStringLengthˇˇ◊
  81. LÕ°dONLNd!e|qÊ)ê denotes a function that ˇˇ∞i.LÕ°dONLNd:qÏ}Ê(zÏ<returns the length of a string. The string is assumed to be LÕ°dONLNdv}Ïâ*     non-NULL.ˇ(dˇ ˇˇˇˇd
  82. d
  83. 4rl|¯,Times
  84. .fi¿(zaCommon Component Overview4¥læ
  85. ˝`(ªèOPF Reference Manual)v3
  86. ˇˇˇˇˇˇˇˇtzÉ
  87. ~
  88. É~z~
  89. pzÉ
  90. ~
  91. É~z~
  92.  ~l~¯
  93. 4ë·õ
  94. , Palatino°dONLNdè·õ£(ò·)The following primitive memory operations
  95. j¿°dONLNdˇˇ(î§1
  96. j¿°dONLNd)è®õÍ+ are defined in ,
  97. Courier.°dONLNd9õ·ß(§·
  98. FWPriMem.h°dONLNdCõß )<:.°dONLNdE±ÛΩ˘(∫Û•.LÕ°dONLNdG±˛Ωî) FW_PrimitiveAllocateBlockLÕ°dONLNd`±îΩË)ñ denotes a function ˇˇ√fl.LÕ°dONLNdtΩ˛…¯(Δ˛:that allocates a block of memory and returns a pointer to ˇˇ˛>LÕ°dONLNdÆ…˛’¯* :that block of memory, if the allocate block request could ˇˇ„˘LÕ°dONLNdË’˛·¯* <be satisfied, and NULL if it could not. This is a low-level .LÕ°dONLNd$·˛ÌH* method; use the LÕ°dONLNd4·HÌ)JFW_CMemoryManager::Allocate–LÕ°dONLNdPÌ˛˘"(ˆ˛Block LÕ°dONLNdVÌ"˘l)$method instead..°dONLNdfÛ˘( Û•.LÕ°dONLNdh˛Ç) FW_PrimitiveCopyMemoryLÕ°dONLNd~ÇÌ)Ñ denotes a function that .LÕ°dONLNdó˛Ò(˛7copies a block of memory pointed to by a source to the LÕ°dONLNdŒ˛'Ó* 7block of memory pointed to by a destination. This is a .LÕ°dONLNd'˛3u* low-level method; use theLÕ°dONLNd'u3Û)w FW_CMemoryManager::–LÕ°dONLNd33˛?:(<˛
  99. CopyMemoryLÕ°dONLNd=3:?Ü)< method instead..°dONLNdNIÛU˘(RÛ•.LÕ°dONLNdPI˛U|) FW_PrimitiveFreeBlockLÕ°dONLNdeI|UÁ)~ denotes a function that .LÕ°dONLNd~U˛a (^˛.frees a block of memory that was allocated by .LÕ°dONLNd¨a˛mî* FW_PrimitiveAllocateBlockLÕ°dONLNd≈aîmÒ)ñ. This is a low-level LÕ°dONLNd€m˛yH(v˛method; use the LÕ°dONLNdÎmHyˆ)JFW_CMemoryManager::FreeBlock .LÕ°dONLNdy˛ÖE(Dzmethod instead.°dONLNdèÛõ˘(òÛ•ˇˇÖ.LÕ°dONLNdè˛õé) FW_PrimitiveGetBlockSizeˇˇ◊
  100. LÕ°dONLNd2èéõ¯)ê denotes a function that .LÕ°dONLNdKõ˛ß˜(§˛9gets the size of a block of memory and returns the block .LÕ°dONLNdÑ߲≥⁄* 2size in bytes. This is a low-level method; use theLÕ°dONLNd∂ß⁄≥‡)‹ LÕ°dONLNd∑≥˛øæ(º˛ FW_CMemoryManager::GetBlockSize LÕ°dONLNd◊≥æø„)¿method .LÕ°dONLNdfiø˛À (»˛instead.°dONLNdÁ’Û·˘(fiÛ•.LÕ°dONLNdÈ’˛·à) FW_PrimitiveResizeBlockLÕ°dONLNd’à·Û)ä denotes a function that .LÕ°dONLNd·˛ÌÚ(Ͳ8resizes a block of memory and returns a pointer to that LÕ°dONLNdQÌ˛˘È* 6block of memory, if the resize block request could be LÕ°dONLNdᢲÊ* 6satisfied, and NULL if it could not. The block can be ˇˇÁMLÕ°dONLNdΩ˛¯* :moved to satisfy the request. This is a low-level method; .LÕ°dONLNd˜˛ * use the LÕ°dONLNdˇ ⁄)"FW_CMemoryManager::ResizeBlock .LÕ°dONLNd˛)E(&˛method instead.
  101. V·]
  102. 4V·\
  103.  Y·Y
  104. 
  105. d
  106.     °dONLNdˇˇ(bÛ>1. Primitive memory operations provide a platform-independent ‹(°dONLNdˇˇ+     >interface to lower-level operating system services for memory ‹(°dONLNdˇˇ* :management. These operations are intended for use by very ˇˇíR‹(°dONLNdˇˇ* @low-level code. Parts (and most of OPF) should use higher-level 
  107. ë·ò
  108. 4ë·ó
  109.  î·î
  110. 
  111. d‹(°dONLNdˇˇ*  interfaces in FW_CMemoryManager.ˇLdˇ ˇˇˇˇd
  112. d
  113. 4oly¯,Times
  114. .+lx1)Common Component ~l~¯4≥ZΩ¯
  115. (πZ4)OPF Reference Manual
  116. ˇˇˇˇˇˇˇˇtzZÉc~cÉ^~Zz^~cpzZÉc~cÉ^~Zz^~c
  117. 4êœö¯
  118. °dONLNdèœõQ(òœComponent dependencies, Palatino
  119. °dONLNdúœ®‚*
  120. The ª¿°dONLNdú‚®?)Common componentó@°dONLNd+ú@®fl)^' is entirely self-contained and is not °dONLNdR®œ¥â(±œ&dependent on any other OPF components.ˇ